#include <gmlib/sm2/internal/sm2p256v1.h>
#include <stdexcept>
#include <cstring>

using namespace sm2::internal;

void test_sm2_fp_sqrt()
{
    sm2_fp_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x95,0x8d,0xa3,0xb4,0x52,0xf3,0xdc,0x48,0x01,0xd2,0x4d,0x5b,0x19,0x72,0xf3,0xfb,0x5b,0xa7,0x69,0x83,0xde,0xdb,0x71,0xa2,0x4f,0xda,0x2f,0xa8,0xbd,0xe8,0x57,0x5d};
    static std::uint8_t c0[32] = {0xf6,0xac,0xa2,0x7c,0x98,0x87,0x41,0x74,0x3f,0x3b,0x96,0xba,0x2f,0x41,0x98,0x67,0xd3,0x1d,0x92,0x9c,0xd5,0x0d,0xf9,0xb2,0xe5,0x1e,0xaf,0xf4,0x94,0x03,0x4e,0xe2};
    sm2_fp_from_bytes(a, a0);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a1[32] = {0x47,0xdf,0x39,0x79,0xc8,0xd7,0x6c,0xcb,0xc7,0xb4,0xb4,0xbb,0x3c,0x28,0x2c,0xc6,0x31,0xc5,0x65,0xe2,0x4b,0xcf,0xb5,0xe2,0x89,0x83,0x1e,0x37,0xe8,0x0a,0xee,0xf0};
    static std::uint8_t c1[32] = {0x4b,0xc2,0xe3,0x37,0x73,0x76,0xdb,0xaa,0x54,0xd4,0xff,0x48,0x05,0x31,0x6f,0x39,0xb9,0x68,0xaf,0xa9,0x7d,0xb7,0xb3,0xdb,0x49,0xee,0x6f,0xbe,0xc2,0x05,0xd9,0x70};
    sm2_fp_from_bytes(a, a1);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a2[32] = {0x73,0xe1,0x60,0xd0,0xde,0xe6,0x6e,0xb7,0x45,0x43,0x61,0x6a,0x5a,0x85,0x95,0xfa,0x0f,0x99,0x2d,0x48,0x7c,0x13,0xf3,0xe8,0xe0,0x2b,0x2f,0x6c,0xcc,0x6c,0x0b,0xfd};
    static std::uint8_t c2[32] = {0x42,0xee,0xe3,0xf1,0x21,0x91,0x9b,0x5f,0xad,0xc5,0x0b,0x1c,0xe7,0xdb,0x0a,0x89,0x3f,0x1a,0xf1,0xab,0x40,0x60,0x5d,0x39,0xdf,0x67,0x91,0x31,0x57,0xb5,0x6f,0xbc};
    sm2_fp_from_bytes(a, a2);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a3[32] = {0x09,0x4d,0x72,0x31,0x34,0xb9,0x85,0xcb,0x0d,0xd7,0xaf,0x7b,0x15,0xf1,0xe9,0x2e,0xc7,0x4b,0x99,0x8d,0x8a,0xc8,0x54,0x80,0x7c,0xf8,0xc9,0x53,0x7b,0xc9,0xc5,0x23};
    static std::uint8_t c3[32] = {0x6e,0xc0,0x14,0xb1,0x2e,0xd7,0x33,0x34,0x6e,0x76,0xca,0xbe,0x0c,0x99,0x54,0xc5,0x9d,0xdc,0x7f,0x2a,0xbd,0xf5,0x4f,0x53,0x2a,0xa7,0xd5,0x35,0xe6,0xa1,0x79,0xfd};
    sm2_fp_from_bytes(a, a3);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a4[32] = {0xdd,0xef,0x30,0x44,0x67,0x34,0x6f,0xf0,0x8e,0x60,0xed,0x18,0xce,0xe7,0x36,0xc2,0x4a,0x07,0x65,0x4e,0x11,0x68,0x46,0xd4,0x14,0xdd,0x04,0xbf,0xb5,0x8a,0xc0,0xe9};
    static std::uint8_t c4[32] = {0xaf,0x0a,0xff,0xc5,0x02,0xdd,0xd1,0x57,0x1b,0x4e,0x26,0xaa,0x9f,0xbb,0x2a,0x8a,0xaf,0xd0,0x02,0x67,0x79,0x16,0xc5,0xb0,0x43,0x85,0x76,0xc9,0xc8,0xeb,0xc4,0x01};
    sm2_fp_from_bytes(a, a4);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a5[32] = {0xba,0x12,0x23,0x69,0x35,0xad,0x16,0x78,0x17,0xc2,0x5d,0xb9,0xfa,0x26,0x58,0x71,0x1a,0x9a,0x21,0x3b,0xcb,0x0f,0x53,0xb5,0x94,0xaa,0xe1,0x91,0xb4,0x85,0x64,0xd5};
    static std::uint8_t c5[32] = {0x55,0x79,0x0e,0x2e,0x2e,0x99,0xb4,0x0b,0xae,0x63,0x7a,0x94,0xbe,0xf5,0x2f,0x1f,0xb4,0xa0,0xb3,0x43,0x5f,0xa2,0xe7,0xc8,0x9e,0xe4,0x37,0x90,0xae,0x24,0x20,0xfa};
    sm2_fp_from_bytes(a, a5);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a6[32] = {0xe1,0xfa,0x09,0x75,0x52,0xe8,0x90,0xa2,0x68,0x10,0xbe,0x28,0x62,0xa3,0xe1,0x26,0x33,0xab,0xb4,0x03,0xf0,0x6d,0x1e,0x56,0xff,0x09,0x0a,0x79,0x4f,0xed,0xd6,0x16};
    static std::uint8_t c6[32] = {0x90,0x8b,0xdd,0xb1,0x2d,0xed,0xc0,0xc1,0x29,0x18,0x8d,0x9a,0x63,0x15,0x52,0x49,0x87,0xb5,0x88,0x38,0xe6,0xb4,0x5e,0x40,0x65,0x08,0xc6,0x15,0xf6,0x02,0xe4,0x7d};
    sm2_fp_from_bytes(a, a6);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a7[32] = {0xa5,0x76,0xfb,0xa5,0x91,0x9d,0xe2,0x0c,0x00,0x79,0x0c,0x10,0xea,0xfa,0x86,0x73,0x8d,0xb7,0x69,0x74,0x69,0x79,0x45,0xda,0xa3,0xda,0xd2,0x98,0x8c,0xd0,0xeb,0x7d};
    static std::uint8_t c7[32] = {0xf0,0xd5,0x21,0xf0,0x0b,0x72,0xb9,0x53,0xea,0xfb,0x8d,0xb7,0xf1,0x01,0x1b,0x81,0x05,0xb2,0xfc,0x62,0xbc,0x13,0x6c,0xfe,0x8e,0x0c,0xe4,0x63,0x50,0x54,0x3b,0x14};
    sm2_fp_from_bytes(a, a7);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a8[32] = {0x94,0x28,0x6d,0xb7,0x90,0x25,0x2f,0x3f,0xa2,0x3d,0x88,0x60,0x2c,0xc5,0x8c,0xfb,0xff,0x88,0x13,0xa7,0x62,0x25,0x57,0xe8,0xf6,0x44,0xdf,0x68,0xb2,0xf2,0xcf,0xb7};
    static std::uint8_t c8[32] = {0x5f,0x19,0xfa,0xec,0x25,0xea,0x99,0x24,0x7a,0x15,0x18,0x72,0x3f,0xf3,0x64,0x72,0x10,0x2d,0xae,0x66,0xf3,0x88,0x98,0x32,0x73,0xf0,0x75,0x0d,0x55,0x42,0x35,0x5e};
    sm2_fp_from_bytes(a, a8);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a9[32] = {0x00,0x74,0x7a,0x0d,0xbc,0x42,0x78,0xb8,0x7a,0xd6,0x1b,0xb5,0xfd,0xbe,0x5c,0xaf,0x41,0x29,0xfa,0xdc,0x88,0x5f,0x38,0x1c,0x95,0xf3,0xe2,0x38,0xd7,0xe9,0xbc,0x8a};
    static std::uint8_t c9[32] = {0x9e,0x36,0x43,0xa9,0x2b,0x4c,0xb6,0x32,0x15,0x39,0xf3,0x53,0xa2,0x6f,0x0e,0xbc,0xcf,0x0d,0xb6,0xb9,0x9b,0xd5,0x90,0xfa,0x91,0x83,0x86,0x15,0x9c,0x01,0x12,0xcc};
    sm2_fp_from_bytes(a, a9);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a10[32] = {0x3b,0xed,0xf1,0xee,0x1d,0x70,0xa0,0xdb,0xf4,0xaa,0x85,0xfc,0xd2,0xe8,0x10,0x48,0xf5,0x7c,0x93,0xe0,0x6b,0x7d,0xed,0xdd,0x9d,0x70,0xb2,0x90,0x8f,0x30,0xb2,0xcf};
    static std::uint8_t c10[32] = {0xfe,0xa1,0xf8,0x73,0x13,0x4a,0xf6,0x41,0x9c,0x9f,0xe4,0xcf,0xc9,0xad,0x80,0x4c,0x74,0x05,0x5d,0xc7,0x3f,0xc9,0x36,0x6c,0x26,0x68,0x74,0xd6,0x81,0x60,0xfe,0x28};
    sm2_fp_from_bytes(a, a10);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a11[32] = {0xa9,0x42,0x29,0x21,0xf2,0xde,0x04,0xcf,0x81,0xcd,0x7c,0xf7,0xfb,0x5f,0x81,0x57,0x7c,0x1b,0xfc,0x03,0xbe,0xf5,0xb4,0x33,0x00,0xdd,0xa1,0xcc,0xd3,0x77,0x8f,0xc3};
    static std::uint8_t c11[32] = {0x92,0x05,0x87,0x22,0x83,0xc6,0x6a,0xe7,0x51,0x66,0xfc,0x3d,0x86,0xc1,0xf9,0xe2,0x0b,0xc3,0x27,0xb1,0x56,0xe0,0xa6,0xf4,0xb5,0xe3,0x9e,0x95,0xa0,0x62,0xe8,0x26};
    sm2_fp_from_bytes(a, a11);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a12[32] = {0xcb,0x39,0x1e,0xd6,0xa7,0x54,0x24,0x32,0x4b,0x47,0x31,0xbb,0x85,0x29,0x55,0xf6,0x7c,0x54,0xc4,0xff,0xa9,0x50,0xda,0x3e,0xef,0x78,0xb5,0x2a,0x43,0xae,0x7a,0x42};
    static std::uint8_t c12[32] = {0xd7,0xc2,0x03,0xab,0x41,0x9a,0x11,0x30,0x77,0x99,0x00,0xa8,0x0b,0x79,0xb8,0x1b,0x04,0x2c,0xc3,0x22,0xda,0xb0,0xea,0x4b,0x83,0xf5,0xc6,0xfe,0xa2,0x47,0x9a,0xc9};
    sm2_fp_from_bytes(a, a12);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a13[32] = {0xa5,0x72,0xd8,0x0b,0x9a,0x92,0xaf,0xb2,0xbf,0xde,0x07,0xe1,0x39,0x5f,0x15,0xe6,0x8a,0x94,0xeb,0xe9,0xc1,0x8e,0x3e,0x2b,0x56,0x06,0x5a,0x91,0x82,0x76,0x9b,0x27};
    static std::uint8_t c13[32] = {0x44,0x8d,0x4d,0x93,0xb7,0xef,0x3d,0x0c,0xc6,0x59,0x4f,0x0b,0x61,0x00,0x04,0x7a,0xf8,0x72,0xdf,0x7e,0x60,0x47,0x36,0x14,0xf2,0xa3,0xe4,0x4c,0xfa,0xf8,0xe6,0x53};
    sm2_fp_from_bytes(a, a13);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a14[32] = {0x16,0x25,0x60,0xf5,0xf6,0xc3,0xd0,0x2b,0x1a,0x67,0x3d,0xce,0x27,0xa0,0x8d,0xde,0xf3,0x5f,0x39,0x60,0x7d,0x82,0xbb,0xc5,0xca,0x62,0x94,0x6f,0x9c,0x4b,0xd3,0xa9};
    static std::uint8_t c14[32] = {0x23,0x5f,0xce,0x93,0xf6,0x29,0xdd,0x76,0x6a,0x24,0x0a,0x52,0x0c,0x72,0x79,0x9c,0x4d,0xbc,0xcc,0x73,0x61,0x9b,0x62,0xe3,0x23,0x12,0x1d,0xd2,0x97,0x74,0x01,0x16};
    sm2_fp_from_bytes(a, a14);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a15[32] = {0x79,0x3d,0x3b,0x23,0x0a,0x9c,0xb9,0xaa,0x5f,0xe0,0xdd,0xc4,0x0b,0x2e,0xc6,0x5a,0xbf,0xc8,0x2d,0x64,0x60,0x8d,0x73,0x8f,0x77,0x5f,0x54,0xa7,0xc5,0xa7,0x32,0x0c};
    static std::uint8_t c15[32] = {0x69,0xd0,0x37,0x5f,0x72,0x52,0x80,0x65,0x01,0x00,0xf9,0xed,0x88,0x06,0x98,0xdf,0x19,0xc4,0x88,0x52,0x27,0xc5,0x79,0x6c,0x77,0xdf,0x33,0x9a,0x05,0xc9,0x6d,0xf4};
    sm2_fp_from_bytes(a, a15);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a16[32] = {0x0f,0x9f,0x36,0x87,0xe2,0x95,0xb9,0xa1,0xfe,0xbd,0x18,0x1b,0x09,0xad,0x10,0x97,0x08,0x45,0xea,0x3c,0xa3,0xcd,0xf4,0x00,0x4e,0xa4,0x08,0x63,0x8e,0x32,0xb8,0x11};
    static std::uint8_t c16[32] = {0x29,0x56,0x67,0x19,0x5c,0x5d,0x19,0xe2,0xf1,0x44,0x46,0x8c,0x26,0xfb,0x96,0xdd,0x20,0x5b,0x7a,0xe8,0x7d,0xd5,0x78,0xf0,0xbf,0xbb,0x13,0x29,0x10,0xa2,0x3c,0x41};
    sm2_fp_from_bytes(a, a16);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a17[32] = {0xb6,0xf6,0x2b,0x2a,0xeb,0x0f,0xcb,0x10,0x24,0xb7,0x44,0x38,0x10,0xd7,0xc0,0xdb,0x00,0xd5,0x30,0x41,0x27,0x9e,0x23,0x4d,0xea,0x65,0x24,0x96,0x59,0x4a,0xf8,0x42};
    static std::uint8_t c17[32] = {0xa2,0x6d,0x3b,0x57,0xd4,0x9c,0x25,0x10,0x44,0x43,0xb2,0xa1,0x9b,0xd8,0x5c,0xab,0x5b,0x02,0xcc,0x72,0x0d,0x19,0xea,0x07,0x42,0xcc,0x40,0x2e,0xed,0x1c,0x99,0xa5};
    sm2_fp_from_bytes(a, a17);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a18[32] = {0x48,0xa5,0x01,0x15,0xbe,0xf7,0x5e,0xe7,0x9b,0x21,0x07,0x64,0xcb,0x4b,0x41,0x97,0xd8,0x5e,0xcb,0x95,0xf5,0x18,0xea,0xef,0x6a,0xa6,0xee,0x6f,0xb2,0x7e,0xfe,0x8c};
    static std::uint8_t c18[32] = {0x85,0xd4,0xc0,0x39,0xf9,0x8a,0x61,0x8f,0x06,0x33,0xc8,0xe8,0x41,0xc6,0xa5,0xd7,0xed,0x8e,0x49,0xb9,0x2e,0x5c,0xe6,0xb2,0x00,0x0b,0x58,0x13,0x35,0x43,0xf4,0xb4};
    sm2_fp_from_bytes(a, a18);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a19[32] = {0xad,0x89,0xa3,0x85,0x55,0x46,0xc7,0xf3,0x87,0x8a,0xa3,0x39,0x76,0x6d,0x0e,0x9f,0x62,0xca,0xfb,0x0d,0x7d,0xc4,0x62,0xc9,0x3c,0xa8,0x8c,0x7c,0x0c,0xca,0xbd,0x49};
    static std::uint8_t c19[32] = {0xe8,0x8d,0x5d,0x45,0xd5,0x37,0xcd,0x5a,0xa7,0x29,0x05,0xf1,0x73,0xb6,0x8c,0xba,0xc3,0x44,0x76,0x84,0x23,0x50,0xa4,0xd0,0x33,0x43,0x97,0xc9,0xb9,0x0d,0xa5,0x3e};
    sm2_fp_from_bytes(a, a19);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a20[32] = {0xdf,0x5d,0xf0,0x7e,0xdd,0xb1,0x54,0xd7,0x3e,0xd0,0xfc,0x7f,0x10,0xab,0xb0,0x9d,0xc8,0xa9,0x48,0x29,0x26,0x76,0xc1,0x44,0x4f,0xe4,0x31,0x04,0xd8,0x5d,0x35,0x06};
    static std::uint8_t c20[32] = {0x99,0x19,0x36,0x12,0x08,0x97,0x08,0x0c,0x20,0xc7,0x74,0x69,0x27,0x13,0x23,0x48,0xde,0x63,0x11,0x28,0x26,0xcc,0xc9,0xb7,0xdd,0xe1,0x44,0x3c,0xe4,0x01,0x2a,0x4d};
    sm2_fp_from_bytes(a, a20);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a21[32] = {0xe9,0x5d,0x6f,0x14,0xe4,0x38,0xf4,0x6e,0x00,0x8b,0xb5,0x14,0xb0,0x5b,0x95,0x2b,0x1b,0x92,0x99,0x9a,0xde,0x1b,0xa3,0x5d,0x63,0x01,0xab,0x3d,0x3d,0x28,0x06,0xa6};
    static std::uint8_t c21[32] = {0x5a,0x94,0x40,0xd2,0xae,0x78,0xc6,0xf0,0xa9,0xda,0x6d,0x4a,0xa1,0x8b,0x06,0x58,0x98,0x00,0xcf,0x14,0x08,0xa0,0xb7,0x31,0x3b,0x9c,0xe5,0x29,0x61,0x38,0xac,0x5d};
    sm2_fp_from_bytes(a, a21);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a22[32] = {0xdd,0x97,0x39,0x1d,0x58,0xf2,0xc3,0xc2,0xc0,0xe7,0x71,0x64,0x96,0xfb,0x48,0xf9,0x61,0xf9,0x27,0xd4,0x71,0x3a,0x65,0xd5,0x1b,0x78,0x5e,0x4a,0xa3,0xd0,0x45,0x65};
    static std::uint8_t c22[32] = {0x52,0xf2,0x70,0xbc,0x83,0xcd,0xfb,0x54,0xdb,0x01,0x62,0x48,0x25,0x4c,0x1a,0xee,0xac,0x3c,0xa7,0x5a,0xb0,0x75,0x88,0xbc,0x0d,0x1f,0x39,0xca,0xfd,0xe8,0xed,0x90};
    sm2_fp_from_bytes(a, a22);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a23[32] = {0x7f,0x24,0x11,0x5e,0x61,0x23,0x5a,0x1c,0xf6,0xe6,0x8a,0xc4,0xeb,0x87,0x2e,0xdc,0xa8,0x87,0x21,0x5e,0x83,0x30,0x79,0x0c,0x53,0x6c,0x4d,0xe7,0x3e,0x17,0x94,0x38};
    static std::uint8_t c23[32] = {0x46,0xa3,0xe4,0x1e,0x15,0x94,0x3b,0x93,0xbe,0x55,0x51,0xd2,0x29,0x57,0x50,0x64,0xaa,0x5a,0x33,0xb4,0x1e,0x4d,0x2b,0x7b,0x0e,0x9a,0x76,0xbd,0x26,0x82,0x02,0x30};
    sm2_fp_from_bytes(a, a23);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a24[32] = {0x58,0x43,0xc9,0x9d,0x49,0xfe,0xd3,0x15,0xdd,0x3f,0xa2,0xd5,0x0b,0xa8,0x56,0x96,0x87,0x60,0x04,0x1b,0x31,0x43,0x0a,0x47,0x6a,0xe4,0x4e,0x35,0xed,0x28,0xb6,0xa0};
    static std::uint8_t c24[32] = {0xc3,0x5e,0x1e,0x4f,0xf8,0xa2,0x2d,0xa9,0xe8,0xac,0x12,0x42,0x84,0x7d,0xd2,0xee,0xc6,0x9f,0xab,0x5d,0x56,0x5d,0xa4,0x33,0x04,0xd7,0x83,0x0e,0xb7,0x57,0xed,0x8f};
    sm2_fp_from_bytes(a, a24);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a25[32] = {0xfc,0x01,0xb5,0xc0,0xce,0x52,0x50,0x16,0x45,0x14,0x8e,0x00,0xb6,0xdb,0xd3,0xf2,0x2d,0xc0,0x70,0xa3,0x86,0xa2,0x18,0xdf,0x37,0x63,0x29,0x9d,0xee,0x89,0xb4,0x5e};
    static std::uint8_t c25[32] = {0x8d,0x25,0xdd,0xe1,0xeb,0x22,0xa1,0x83,0xf8,0xbd,0x5c,0x2e,0x42,0x5b,0xc0,0xf2,0xef,0x3d,0x6d,0x32,0xd7,0x8b,0xae,0x60,0xf8,0xef,0x45,0xe8,0x2d,0x0a,0x6c,0xae};
    sm2_fp_from_bytes(a, a25);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a26[32] = {0x6f,0x16,0x46,0xc1,0x72,0x12,0xa3,0x70,0x18,0x79,0x4b,0xb7,0x18,0x0d,0x12,0x29,0x7f,0x87,0x92,0x10,0x66,0x7e,0x46,0x57,0x6f,0xb5,0x3a,0xa1,0x47,0x63,0xb2,0x79};
    static std::uint8_t c26[32] = {0x8c,0xe2,0x26,0x7a,0x3d,0xbd,0xd9,0xf0,0xa7,0x15,0xc1,0xfc,0xaa,0x37,0xe6,0x43,0x95,0x4d,0x53,0x6f,0xc1,0x9f,0x22,0x5c,0xfb,0xe3,0x4b,0xc1,0x1d,0x1d,0x3b,0xa9};
    sm2_fp_from_bytes(a, a26);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a27[32] = {0xf1,0x06,0x2e,0x53,0x0d,0xbb,0x49,0x37,0x8a,0xdb,0x0b,0x70,0x05,0x81,0xe9,0x66,0x13,0xeb,0xe5,0x64,0x78,0xfd,0x2c,0x74,0xa9,0x6b,0x4f,0x59,0x35,0xa1,0x9f,0xa1};
    static std::uint8_t c27[32] = {0xb9,0x01,0x45,0xc3,0x89,0x65,0x72,0xfe,0xce,0x6b,0x3e,0xe2,0x22,0x26,0xe9,0xf4,0x7a,0x9a,0x9d,0xc5,0x1f,0x9e,0xbc,0xb4,0xd9,0x8b,0xc7,0x15,0x08,0x59,0x4e,0xe2};
    sm2_fp_from_bytes(a, a27);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a28[32] = {0xe2,0x9b,0xeb,0xb7,0xd7,0x70,0xba,0x14,0xb0,0xe0,0xfb,0x9e,0x87,0xf3,0x1c,0x3d,0xe2,0x4a,0x7c,0x8c,0x17,0x00,0xaf,0xc6,0x11,0x68,0x1b,0x9e,0x8f,0xc2,0xc5,0x53};
    static std::uint8_t c28[32] = {0xff,0x4f,0x38,0x4e,0x0c,0xb4,0xa9,0x46,0x1d,0x21,0xc7,0xcb,0x1d,0x44,0xe6,0x11,0x05,0xc7,0x69,0xfd,0x6e,0x4a,0xd8,0x65,0x2f,0xce,0x26,0x70,0x7d,0x24,0xb0,0xb7};
    sm2_fp_from_bytes(a, a28);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a29[32] = {0xeb,0xa5,0x97,0x69,0x6c,0x72,0x4e,0xab,0xde,0x0a,0x0c,0x61,0xac,0x5f,0x1b,0xb8,0x08,0x36,0x99,0x37,0x36,0x48,0xd3,0x97,0xaf,0x95,0x59,0xfb,0x10,0xb8,0xdb,0xc3};
    static std::uint8_t c29[32] = {0x16,0x8b,0xc4,0xbb,0x91,0xa2,0x1e,0x9e,0x16,0x25,0x62,0x85,0xe4,0x82,0x94,0x27,0x57,0x59,0xe9,0x45,0xf1,0x7d,0xa4,0xe9,0x3c,0x07,0xb6,0x64,0xc9,0xaa,0xe2,0x2e};
    sm2_fp_from_bytes(a, a29);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a30[32] = {0x66,0x5b,0x11,0xbb,0x11,0x8e,0xa3,0x01,0x78,0x47,0x83,0xa1,0xf0,0x90,0x0b,0x71,0xbf,0x5e,0x2b,0xfa,0x3e,0x91,0x1b,0x39,0xb4,0xc6,0xfe,0x44,0xbb,0xf8,0xd9,0xbc};
    static std::uint8_t c30[32] = {0x38,0xd8,0xd5,0x54,0x60,0xb3,0x21,0xa3,0x9e,0xf9,0xa2,0x08,0xf4,0xcc,0x88,0x1a,0xb1,0xd9,0x07,0x39,0x6c,0xa5,0x77,0x54,0x2b,0x29,0xa6,0xbd,0xba,0x25,0xf8,0x05};
    sm2_fp_from_bytes(a, a30);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a31[32] = {0xb4,0x7f,0x53,0x40,0x7e,0x4e,0x15,0xd9,0xc5,0x85,0xa6,0x50,0xd4,0x1b,0x94,0xa3,0x6f,0x9e,0xb9,0x27,0x9b,0x9d,0x80,0xfc,0xba,0xb2,0x7c,0x9c,0xd0,0x97,0x7e,0x76};
    static std::uint8_t c31[32] = {0x26,0x8d,0x2d,0x8e,0xc2,0x91,0x4c,0x29,0xef,0xba,0x06,0xce,0x18,0xd8,0x19,0xe2,0xcc,0x8e,0x20,0x0b,0x4c,0xb2,0x23,0xef,0x41,0x12,0xf9,0x81,0x7c,0xf1,0x23,0xeb};
    sm2_fp_from_bytes(a, a31);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a32[32] = {0xd8,0x9d,0x18,0x9f,0x5d,0xfd,0x9c,0xcf,0xcc,0xc9,0xda,0x63,0x37,0x25,0xb8,0x70,0x75,0x63,0xb3,0xc1,0x1a,0x41,0xa3,0xbf,0x49,0x3c,0x40,0x70,0x60,0x45,0x6b,0xa1};
    static std::uint8_t c32[32] = {0x22,0x13,0xb6,0x96,0x61,0x00,0xc1,0xab,0x21,0x07,0xf7,0x35,0x83,0xec,0x27,0xa0,0xc0,0x08,0x14,0xe3,0xbc,0x7f,0x28,0xe7,0x8f,0xe1,0x28,0xc3,0x1b,0xcc,0xee,0x9a};
    sm2_fp_from_bytes(a, a32);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a33[32] = {0xbd,0xc5,0xac,0x69,0xd9,0xe5,0xb3,0x16,0x09,0x86,0xc2,0x30,0x0d,0xeb,0xaa,0x0e,0x3b,0x75,0x89,0x02,0x26,0x9d,0x64,0x63,0x53,0xc9,0xdf,0x92,0x35,0xbe,0x72,0x4c};
    static std::uint8_t c33[32] = {0x34,0x3c,0x7f,0x1a,0xe8,0xc1,0x7d,0x0b,0x4d,0x49,0x75,0x52,0xa7,0x37,0x4a,0xdb,0x18,0x80,0x05,0xb5,0xa3,0xa3,0x22,0x38,0x51,0xd4,0x09,0xca,0x63,0x74,0x42,0x08};
    sm2_fp_from_bytes(a, a33);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a34[32] = {0xf3,0x0d,0x7b,0x3f,0xd2,0xa6,0x84,0xe8,0xfe,0x45,0xf5,0xbf,0x93,0x86,0x14,0x20,0x6f,0x78,0x3f,0xa7,0x2a,0xd4,0x0b,0xdc,0x56,0x05,0xd6,0xf6,0x2f,0xe4,0xb7,0x62};
    static std::uint8_t c34[32] = {0xaa,0x35,0xae,0xf8,0x29,0xc0,0x26,0xce,0xf4,0x2a,0x5b,0xde,0x8d,0xe0,0xaa,0x8b,0x8a,0x8b,0x8a,0x54,0xe5,0x4a,0x69,0xbf,0xe2,0xdd,0xc0,0xeb,0x70,0x7b,0xa5,0x8b};
    sm2_fp_from_bytes(a, a34);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a35[32] = {0x7c,0x2e,0x1b,0x32,0xe6,0xe5,0x7e,0xbe,0x66,0x77,0x52,0x12,0x6a,0x75,0x63,0x1d,0x69,0xa7,0x9b,0x68,0xe9,0xb6,0x08,0x77,0xc8,0x33,0xfb,0x04,0x2c,0xbd,0xae,0x6a};
    static std::uint8_t c35[32] = {0x06,0xaa,0x27,0xc2,0x1e,0x34,0xe0,0xcf,0x6b,0x35,0xe0,0x7e,0x7b,0xbf,0x31,0x2e,0x00,0x7d,0x25,0xa0,0xf7,0xa9,0x37,0x49,0xf1,0x19,0x70,0x8b,0xef,0xa8,0x38,0xb1};
    sm2_fp_from_bytes(a, a35);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a36[32] = {0xd3,0x6c,0xf4,0xaa,0x4f,0x66,0xef,0x1b,0xb9,0xe3,0x7c,0xd4,0x27,0x9b,0x82,0x6f,0x5a,0xca,0x0b,0x14,0xf5,0x03,0xb3,0xe8,0xeb,0x0f,0xd3,0x14,0xb8,0x2a,0x05,0xdb};
    static std::uint8_t c36[32] = {0x37,0xa5,0x9a,0x2b,0x2f,0xd9,0xc6,0xc7,0xe6,0x0f,0xc7,0x4c,0x07,0xc4,0xd9,0xe1,0xd6,0x42,0xdd,0xaa,0x46,0x86,0x97,0xf7,0x3d,0x41,0xb6,0x1e,0x1e,0x94,0x7f,0x9b};
    sm2_fp_from_bytes(a, a36);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a37[32] = {0xe7,0x18,0x2e,0xb0,0x90,0x1a,0x5b,0x64,0x5c,0x56,0x44,0x16,0x3e,0x8b,0x00,0x58,0xf9,0x51,0x4e,0x38,0xf0,0x7b,0x50,0xc9,0x08,0x55,0x42,0x63,0xea,0xca,0x31,0x10};
    static std::uint8_t c37[32] = {0x0d,0x1b,0x5b,0x1d,0xcf,0xae,0xca,0x94,0x03,0xf7,0x33,0xd0,0x54,0xec,0x42,0x8f,0x40,0x2b,0xcd,0xc9,0x37,0x18,0x83,0x8f,0x9c,0xd3,0x05,0x5b,0x0e,0x75,0xfa,0x48};
    sm2_fp_from_bytes(a, a37);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a38[32] = {0xc9,0x8f,0xd8,0x99,0x98,0x02,0x60,0x8b,0x1d,0x87,0x1a,0x53,0xc2,0xce,0x6e,0x69,0x4e,0x34,0xf1,0xe3,0x0a,0x0c,0x01,0x60,0xac,0x98,0x45,0x75,0xfd,0xa8,0x08,0x5e};
    static std::uint8_t c38[32] = {0x7f,0xe1,0x61,0x60,0x65,0xa6,0xd8,0xd6,0x90,0x3d,0xdd,0x9a,0xc2,0xf8,0x78,0x29,0x2f,0x88,0x86,0x65,0x44,0x6f,0x33,0x68,0xab,0x0d,0x16,0x84,0x4c,0xa0,0x56,0x8f};
    sm2_fp_from_bytes(a, a38);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a39[32] = {0x7c,0xdc,0x62,0xae,0xe2,0xa5,0x21,0x6d,0xda,0xb3,0xc9,0x25,0xdf,0x0f,0x95,0x90,0xdd,0xe9,0x15,0xe5,0x98,0x30,0x6b,0x23,0xd8,0x0b,0xa4,0xaa,0xb0,0x23,0x93,0xc8};
    static std::uint8_t c39[32] = {0x9b,0xdf,0x6f,0x6c,0x51,0xcc,0x47,0xe2,0xd7,0xe7,0xa1,0x06,0xbb,0x27,0x7d,0x9d,0x20,0xe1,0x3d,0x40,0x4a,0x22,0xf5,0x9e,0x93,0x9a,0xef,0xa8,0xd6,0xb9,0x27,0xf6};
    sm2_fp_from_bytes(a, a39);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a40[32] = {0x58,0xb7,0x1c,0x30,0x9b,0x05,0xdc,0xe3,0x58,0xbb,0xf6,0x42,0x6b,0x3b,0x38,0x47,0x29,0x87,0x45,0xc1,0xbd,0xf4,0x7d,0x77,0x37,0x0e,0x0b,0xbb,0xd3,0x3a,0xda,0x4e};
    static std::uint8_t c40[32] = {0xb5,0x58,0xbd,0xb7,0x09,0xfc,0xfb,0x86,0xec,0x2a,0xe1,0xfd,0x7a,0xae,0xae,0x5f,0x87,0xbf,0x00,0xae,0x5d,0xa6,0x6e,0x5c,0x1b,0xc9,0x38,0xb0,0x38,0x18,0xe3,0x67};
    sm2_fp_from_bytes(a, a40);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a41[32] = {0x66,0xdc,0xef,0xbb,0xe2,0x71,0x05,0xba,0xd9,0x5f,0xe1,0xfe,0x3f,0x78,0xa2,0xa3,0x12,0x87,0x5e,0xd9,0x1b,0xc7,0x49,0xcc,0xa3,0x63,0x2b,0xe7,0xee,0x1c,0xe1,0x59};
    static std::uint8_t c41[32] = {0x7e,0x70,0x63,0x37,0x1a,0x23,0xfc,0x02,0x44,0xaa,0x1a,0xcc,0x3a,0x45,0xd4,0xb8,0xd2,0x1c,0x2c,0x26,0x14,0xcc,0x13,0xc2,0x6d,0x7e,0xff,0xc7,0x5b,0xba,0xb6,0x53};
    sm2_fp_from_bytes(a, a41);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a42[32] = {0x40,0xa0,0x47,0xb1,0x92,0x0d,0xe7,0x4e,0x21,0xe6,0xa4,0x00,0x85,0xaa,0x7e,0x43,0x8a,0x89,0xcf,0x15,0x9e,0x63,0xd2,0xde,0x13,0x95,0xd8,0x99,0xeb,0x1b,0x9a,0x8c};
    static std::uint8_t c42[32] = {0x92,0x6b,0x44,0xaf,0x29,0x15,0x94,0x20,0xe8,0x4d,0x3b,0x54,0xf0,0xe2,0xde,0xec,0x16,0x58,0x1f,0x06,0x1d,0xad,0x07,0x7e,0x5a,0xbe,0x3f,0x49,0x02,0x5d,0x91,0x2e};
    sm2_fp_from_bytes(a, a42);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a43[32] = {0x01,0x0c,0x65,0xb3,0x82,0xd8,0xb1,0x75,0x56,0x19,0xa4,0x5c,0xa3,0xab,0x37,0xf4,0x18,0xdd,0xda,0xce,0xe8,0xef,0xd8,0x53,0xee,0x4c,0x49,0x93,0xa4,0xda,0xda,0x3e};
    static std::uint8_t c43[32] = {0x81,0xa2,0xc7,0xe5,0xb7,0x44,0x17,0xc7,0x91,0x5a,0x78,0x12,0x70,0xd1,0x40,0x1b,0x77,0xa2,0x18,0x97,0x65,0x17,0x0e,0x8e,0xc1,0x54,0xd2,0xb1,0xc3,0x43,0x8f,0x56};
    sm2_fp_from_bytes(a, a43);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a44[32] = {0x97,0x64,0xe5,0xd4,0x19,0xbf,0xd3,0x19,0x07,0x1f,0x1a,0xa8,0xe1,0x87,0xa3,0x35,0xa8,0x26,0x4c,0xfe,0x3f,0x30,0x0a,0x0b,0x57,0xa7,0x90,0xac,0xb8,0x14,0x36,0x00};
    static std::uint8_t c44[32] = {0x11,0x08,0xc8,0x97,0xf7,0xdd,0x7a,0xef,0x6e,0xd1,0x8e,0x55,0xd8,0xba,0x1b,0x06,0x0a,0x66,0x5f,0xff,0xa5,0xc1,0x03,0x80,0xd3,0x77,0xbd,0x5e,0x13,0x9f,0x5a,0x33};
    sm2_fp_from_bytes(a, a44);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a45[32] = {0x82,0x31,0xa1,0x9d,0x04,0x5d,0x76,0x52,0x34,0x26,0x5e,0x6c,0xaf,0x64,0x44,0x75,0x22,0xbf,0x4c,0x3e,0xaf,0x1b,0xb0,0xc1,0x2a,0x18,0xb8,0x5d,0x1c,0x3f,0xf1,0xd7};
    static std::uint8_t c45[32] = {0xff,0xfc,0x72,0x7e,0xe3,0xa1,0x39,0x84,0xef,0x36,0xbc,0xe8,0xea,0x28,0x89,0xab,0x01,0x24,0x05,0xc3,0xb6,0xd1,0x79,0x30,0xc5,0x9b,0x42,0x52,0xba,0x37,0x0c,0x13};
    sm2_fp_from_bytes(a, a45);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a46[32] = {0x31,0x11,0xce,0x3d,0x16,0xac,0x13,0x2b,0x8a,0x5c,0x8d,0x7a,0xb2,0x3d,0x4d,0x20,0x20,0x1c,0xb3,0x62,0x4a,0x5e,0x61,0x63,0xb5,0x83,0xef,0xa3,0xe9,0x61,0x9f,0x36};
    static std::uint8_t c46[32] = {0x95,0xef,0x55,0x41,0xe5,0xb0,0x99,0xe9,0xf2,0xc7,0x92,0x4f,0x5d,0x5a,0x6f,0x06,0xe1,0x2b,0x41,0xbf,0x3c,0x9a,0xaa,0x83,0xef,0x13,0x2d,0xa1,0x74,0xe4,0x0d,0x7c};
    sm2_fp_from_bytes(a, a46);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a47[32] = {0x60,0x5a,0xd8,0x8b,0x39,0xf0,0xc8,0x96,0xd6,0x76,0xfa,0x5d,0x2d,0x1c,0xe8,0xe2,0xe9,0x61,0xb8,0xcb,0x3c,0xa3,0xf7,0x96,0xb0,0x32,0x5c,0xe3,0x09,0x97,0x70,0xe2};
    static std::uint8_t c47[32] = {0x1a,0xba,0x91,0xeb,0x37,0xaa,0x0e,0x56,0x9a,0x9a,0x63,0xb9,0x2f,0x83,0x3e,0xde,0x13,0xeb,0x64,0xbd,0xcc,0x77,0xed,0x2d,0x49,0x12,0xa0,0xae,0xa4,0x76,0x80,0xe2};
    sm2_fp_from_bytes(a, a47);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a48[32] = {0xb9,0x5c,0xf1,0xfe,0x45,0x33,0x5a,0x51,0x1a,0xfb,0x6b,0x4c,0x88,0x02,0x01,0xb9,0x7b,0x6f,0x84,0x52,0x20,0x39,0x22,0x5a,0xea,0xd4,0x38,0xde,0x55,0x1b,0x30,0x90};
    static std::uint8_t c48[32] = {0x6c,0xf5,0x64,0x0b,0x3b,0xdd,0x8c,0xec,0x5a,0xc2,0xbf,0x7c,0xb2,0xc7,0xd5,0x5d,0xdd,0x86,0xa8,0x52,0x4b,0x9a,0x49,0x95,0xec,0xcb,0x76,0xf0,0x24,0x7b,0x0e,0x51};
    sm2_fp_from_bytes(a, a48);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a49[32] = {0x48,0x02,0x65,0xf1,0xc7,0x64,0x61,0xd2,0x3a,0x5f,0xa9,0x26,0xb0,0xe3,0xd3,0xfb,0x8c,0xed,0x39,0x5b,0x0a,0xa0,0xc0,0xb4,0x94,0xc3,0xc9,0x45,0x8a,0x54,0x02,0x6e};
    static std::uint8_t c49[32] = {0xe9,0x63,0x64,0x08,0x4e,0x26,0x67,0x71,0x6a,0x50,0x0b,0xfb,0x7f,0x11,0x36,0x74,0x85,0x45,0xeb,0x4d,0xed,0x12,0xc8,0xe8,0x1d,0xde,0xa5,0x37,0xf8,0xf5,0xa6,0x95};
    sm2_fp_from_bytes(a, a49);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a50[32] = {0xcf,0x5f,0x0e,0xce,0xf9,0x14,0xa9,0x77,0x13,0x90,0x26,0xd6,0xee,0xdf,0xb1,0x89,0x66,0x82,0x3b,0x3b,0x9f,0x53,0x3b,0x03,0xc0,0x44,0x61,0x63,0x01,0xda,0xc3,0x32};
    static std::uint8_t c50[32] = {0x2f,0x2c,0xb7,0x51,0x04,0xbb,0x3c,0x98,0x5b,0x25,0xd1,0x13,0x33,0x4a,0x5e,0xc2,0x8a,0x33,0x8d,0x55,0xa7,0xd3,0xa4,0x03,0x5e,0xe6,0xc3,0x59,0xb5,0xd1,0xc3,0xe8};
    sm2_fp_from_bytes(a, a50);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a51[32] = {0x35,0xf7,0x5f,0xe7,0x47,0x7d,0x6c,0x24,0x0d,0x05,0xec,0x93,0x1f,0xb9,0x02,0x84,0x1e,0x9c,0x26,0xa2,0xba,0x53,0xf4,0x4a,0x79,0x75,0x55,0x1c,0xfe,0x38,0x66,0x75};
    static std::uint8_t c51[32] = {0xb3,0xbe,0xb5,0x63,0xdd,0x65,0xfd,0xbd,0x59,0xdd,0x74,0xd2,0x12,0x84,0x69,0x7c,0xd0,0xfa,0x4d,0xad,0x43,0x8d,0xcc,0x96,0x9d,0x42,0x39,0xff,0x91,0x56,0x14,0xd8};
    sm2_fp_from_bytes(a, a51);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a52[32] = {0x24,0x00,0x90,0xe4,0x3b,0xcb,0xa6,0xa3,0xb0,0x44,0xad,0xd9,0x2a,0x31,0x14,0x78,0xbc,0x92,0xac,0xc6,0x4a,0xb2,0x53,0xb1,0x5b,0x24,0x80,0xb5,0x40,0x9e,0x1b,0x34};
    static std::uint8_t c52[32] = {0x16,0xff,0x1a,0x8a,0x37,0xca,0x24,0x37,0x5b,0x2f,0x29,0x15,0x0d,0x13,0xc3,0x60,0x6e,0x71,0xc8,0x12,0xf0,0xfc,0x69,0x1a,0xe1,0x49,0xaa,0xa4,0xdf,0x9e,0x49,0x9e};
    sm2_fp_from_bytes(a, a52);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a53[32] = {0x93,0xcb,0xb8,0xa8,0x5c,0xed,0xd8,0x48,0x8f,0xa4,0xf6,0x89,0x8b,0x8e,0x03,0xe7,0x09,0x61,0xec,0x20,0xc1,0x52,0x51,0x69,0x2e,0x80,0x2e,0xac,0x0c,0x63,0x86,0x50};
    static std::uint8_t c53[32] = {0xa1,0x8f,0x06,0xd0,0x05,0x3e,0x0b,0x65,0x9d,0xa3,0x3a,0xd1,0x53,0xf7,0x41,0x36,0xaa,0xc9,0x1e,0x06,0x7f,0x18,0xed,0x05,0x96,0x81,0xf7,0x9c,0x4c,0x2d,0x4e,0x4b};
    sm2_fp_from_bytes(a, a53);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a54[32] = {0xe7,0x52,0x2d,0x19,0xf0,0xf9,0x6b,0x11,0x8e,0xa7,0x55,0x20,0xfd,0xb6,0x92,0xe1,0x78,0x66,0x9e,0xdc,0xfb,0x78,0x1d,0xdc,0x43,0xcd,0xc2,0x9b,0xe1,0x85,0x83,0xcb};
    static std::uint8_t c54[32] = {0x00,0xd0,0x42,0xc6,0xe5,0x03,0x7c,0xfa,0xc7,0x91,0x8e,0xaa,0xf5,0x76,0xd0,0x07,0x61,0x04,0xfb,0xf5,0x12,0x93,0x26,0xee,0x4a,0x85,0x8f,0xdf,0x0a,0x82,0x51,0x40};
    sm2_fp_from_bytes(a, a54);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a55[32] = {0xfb,0x49,0x7b,0x8e,0x3f,0x47,0x84,0x0d,0x4c,0x53,0x48,0x74,0xc0,0xd3,0x59,0x69,0xef,0x11,0xfb,0x02,0x59,0x6b,0x2a,0x9b,0xb4,0x67,0x51,0x92,0x90,0x4e,0x1d,0x83};
    static std::uint8_t c55[32] = {0xda,0xa3,0x59,0xa5,0x05,0x66,0xa8,0x04,0x82,0xa2,0xe4,0x12,0xa1,0x25,0xed,0x59,0x1a,0xb4,0xc8,0x4d,0xbd,0x7d,0x6f,0xa1,0x59,0x1d,0x55,0xe0,0xa7,0x2e,0x7a,0xa8};
    sm2_fp_from_bytes(a, a55);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a56[32] = {0x54,0x11,0xfc,0xeb,0x4a,0xad,0x62,0xa4,0x44,0x61,0x4c,0x81,0xca,0xe8,0xd8,0x95,0x77,0xa0,0x4f,0x57,0x29,0xd0,0xbd,0x78,0x1e,0x27,0x33,0x5f,0x51,0xbc,0x54,0xb4};
    static std::uint8_t c56[32] = {0x5e,0xcb,0x9a,0x29,0xe5,0x03,0xd2,0x4c,0x5e,0x82,0x62,0x40,0x4d,0xc5,0x4d,0xcd,0x65,0x5d,0x3d,0x17,0x75,0x45,0xe4,0xf7,0x38,0x77,0x4c,0x8a,0xa8,0x8e,0x95,0x18};
    sm2_fp_from_bytes(a, a56);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a57[32] = {0x3b,0xcd,0x9b,0xcc,0xaf,0x93,0x74,0xf0,0xc4,0xd9,0xc0,0x68,0xa0,0xf1,0xb9,0x38,0x3c,0xf4,0x35,0x4b,0x70,0x85,0x28,0x6b,0xe0,0x5b,0x1c,0x9f,0x98,0x5a,0xf4,0x5c};
    static std::uint8_t c57[32] = {0xe1,0x32,0x3a,0x7c,0x33,0x11,0x6d,0xe4,0x8a,0x44,0x30,0x4a,0xc1,0x69,0x89,0xf7,0x0a,0xc9,0xc4,0xad,0x32,0xd9,0x24,0x4e,0xb4,0xd3,0xaf,0xab,0x4b,0x20,0x32,0x25};
    sm2_fp_from_bytes(a, a57);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a58[32] = {0xbf,0x77,0xfb,0x7e,0xb8,0x45,0x67,0xff,0xa2,0xa8,0xcd,0xa0,0x08,0xcc,0x8d,0x0d,0x31,0x17,0x97,0x03,0x21,0x1f,0xfe,0x47,0xb3,0xb5,0xa1,0x21,0xae,0xf0,0xd2,0x5c};
    static std::uint8_t c58[32] = {0xd5,0xb0,0x6f,0xe4,0x65,0x73,0xd9,0x66,0x8c,0xac,0xa2,0x76,0xf4,0xee,0x4a,0xc6,0x33,0x88,0x1f,0x4b,0xcb,0x67,0x1a,0xab,0xba,0xf1,0x41,0x88,0x0e,0x53,0xd7,0xfd};
    sm2_fp_from_bytes(a, a58);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a59[32] = {0x22,0x9b,0x57,0x60,0x78,0x67,0x58,0x19,0x76,0xf3,0xd3,0xd3,0x7d,0x5a,0xaf,0xad,0xcd,0x1d,0x0e,0x25,0xc2,0xb9,0x77,0x67,0x7c,0x7a,0x1f,0x59,0x91,0xe7,0x0a,0x9a};
    static std::uint8_t c59[32] = {0xc4,0xee,0xfa,0x79,0x23,0xd0,0x26,0x03,0x0a,0x7c,0xc3,0x05,0x67,0xe6,0x01,0x58,0x72,0xa8,0x0c,0x5b,0x80,0x96,0xdb,0xae,0xc3,0x92,0x2f,0xd3,0x25,0xa1,0x5f,0x0d};
    sm2_fp_from_bytes(a, a59);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a60[32] = {0xff,0x92,0xb1,0x07,0x50,0x7d,0xd7,0xc5,0xef,0x94,0x70,0x8b,0x0f,0x6f,0xe3,0x37,0xe9,0x08,0xf5,0x0a,0x69,0x86,0x93,0x93,0x08,0x91,0xe0,0xe4,0x49,0x58,0x96,0xfe};
    static std::uint8_t c60[32] = {0x5b,0x97,0xd2,0xa4,0x29,0x0b,0x36,0x78,0xe8,0x4a,0x6c,0x41,0x59,0x95,0x34,0x35,0xbf,0xe3,0xd0,0xfb,0x7f,0x6b,0x5a,0xf7,0x80,0x60,0xe4,0x9e,0xf6,0x7e,0x71,0xcc};
    sm2_fp_from_bytes(a, a60);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a61[32] = {0xc2,0xb5,0x62,0x19,0xa5,0xa0,0x61,0x93,0x7d,0xfe,0x29,0xc0,0xa8,0x1a,0x69,0xfc,0xcb,0x25,0xec,0x37,0x70,0x70,0x44,0xc7,0x29,0x9d,0x81,0xa8,0x84,0xf4,0x02,0x4c};
    static std::uint8_t c61[32] = {0x5c,0x25,0xd6,0x0e,0xc8,0x14,0x97,0xef,0x47,0xe3,0x99,0x0e,0xb9,0xbe,0x63,0x84,0xd6,0x87,0x63,0x15,0xd2,0x1e,0x2c,0x64,0x9b,0xc7,0x0c,0xd0,0xf1,0xc4,0xd6,0xff};
    sm2_fp_from_bytes(a, a61);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a62[32] = {0x6d,0x9c,0xbd,0xe9,0xb2,0x57,0x49,0x27,0x84,0x98,0x34,0xd9,0x62,0x4f,0xa2,0x70,0xff,0x97,0x23,0x31,0xcd,0x46,0x98,0xbb,0x32,0x03,0xf9,0x5a,0xc8,0xd6,0x9e,0x91};
    static std::uint8_t c62[32] = {0xd2,0x01,0x08,0x1e,0x2a,0xdd,0xca,0x64,0x55,0xcc,0xcd,0x69,0xcf,0xc7,0xfd,0xab,0x36,0xc5,0xb3,0x7e,0xdc,0xa8,0x6f,0x65,0xa4,0xd8,0xe7,0x71,0xff,0xcc,0xb6,0x59};
    sm2_fp_from_bytes(a, a62);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a63[32] = {0x36,0x72,0x31,0x0a,0x1d,0x1d,0x86,0xd5,0x23,0xd0,0x08,0xed,0x3a,0xc8,0xb8,0xe3,0x58,0x1e,0x3b,0x04,0xcf,0x18,0xb4,0x56,0xaa,0x90,0xef,0x7b,0xf6,0x76,0xf6,0xa6};
    static std::uint8_t c63[32] = {0x55,0xbf,0x37,0xf9,0xb8,0x45,0x23,0x69,0xd0,0x58,0xd8,0x9c,0x3d,0xf0,0x8b,0x9b,0xf2,0x81,0xee,0x98,0x81,0x52,0x55,0x73,0xc9,0x1d,0xbf,0x0f,0xcc,0x06,0x52,0x3b};
    sm2_fp_from_bytes(a, a63);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a64[32] = {0x80,0x41,0x1d,0x27,0xb6,0x8f,0xeb,0xbb,0x84,0x3b,0xc1,0x4d,0xcf,0x39,0x34,0xcb,0xc7,0x99,0x24,0xf1,0x66,0x89,0xd5,0x61,0xb2,0x36,0x72,0x3e,0x04,0xed,0x8d,0xf3};
    static std::uint8_t c64[32] = {0xda,0x57,0x27,0xde,0x03,0x34,0xb8,0xb3,0x10,0xaf,0x0a,0xae,0xe6,0xbf,0x90,0x3d,0x57,0x64,0x12,0xcb,0x5c,0xa9,0x63,0xd1,0xeb,0x52,0x57,0x1a,0xe2,0x30,0x6b,0xd5};
    sm2_fp_from_bytes(a, a64);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a65[32] = {0x13,0x03,0x42,0x57,0x17,0xf4,0xf1,0x4f,0x24,0xe5,0x9d,0xb9,0x49,0x34,0xa7,0x31,0x39,0x62,0x30,0xa6,0x38,0xec,0x1b,0x08,0x2d,0x0a,0x6c,0xaa,0x61,0xc4,0x7a,0xee};
    static std::uint8_t c65[32] = {0xac,0xe2,0x34,0xbc,0x2b,0x7c,0xce,0xf3,0xa8,0x8a,0x11,0x23,0xe3,0x57,0xe4,0x84,0xee,0x6c,0x01,0x5d,0x54,0xd6,0x5a,0x6f,0xbc,0xbe,0x2e,0x74,0xd9,0x7b,0xa3,0x2c};
    sm2_fp_from_bytes(a, a65);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a66[32] = {0x28,0x46,0xae,0xec,0x9b,0x6d,0x53,0x60,0x6e,0xbe,0xaa,0x6a,0xa4,0x70,0xb2,0x63,0x47,0xe1,0x98,0x68,0x21,0xab,0x33,0x1d,0x3d,0x2b,0xdc,0x01,0x80,0xa0,0xfa,0x84};
    static std::uint8_t c66[32] = {0xb4,0x86,0xbd,0x11,0xbf,0x0c,0x53,0xa2,0xfd,0xec,0x12,0x75,0x5c,0x14,0xfd,0x44,0x3f,0x1e,0x5a,0xe6,0x38,0x7f,0x64,0xf6,0xf5,0x6d,0x85,0xad,0xbe,0x0e,0x5c,0xfc};
    sm2_fp_from_bytes(a, a66);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a67[32] = {0xf9,0x9b,0xdc,0xf6,0xa9,0x6b,0x69,0x37,0xe9,0x07,0xb1,0xf6,0xda,0x5b,0xf1,0xb5,0xc0,0x43,0xf0,0x36,0x6d,0xfe,0x37,0xff,0x6d,0xec,0xd0,0x2a,0xc5,0x89,0x37,0x05};
    static std::uint8_t c67[32] = {0x6f,0xcb,0x63,0xc9,0xfd,0xf7,0x4f,0x1c,0x32,0xfe,0xab,0xaa,0x71,0x54,0xbb,0x0b,0xfc,0x82,0x88,0x59,0x5f,0x73,0x50,0x14,0xa6,0x08,0xe4,0x49,0x4b,0xd7,0xe6,0x80};
    sm2_fp_from_bytes(a, a67);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a68[32] = {0x0f,0x63,0x06,0xc1,0x1d,0xe9,0xd3,0x78,0xc2,0xaf,0x3b,0xc0,0x87,0x52,0xf9,0x35,0x43,0xc0,0xb4,0x1d,0x8b,0x5f,0xe9,0xe3,0x23,0xb2,0x03,0xfb,0x46,0xa1,0x57,0x20};
    static std::uint8_t c68[32] = {0xc7,0xbb,0x33,0x62,0x95,0x4c,0x2d,0x32,0x5b,0x1b,0xfe,0xba,0xdd,0xef,0x92,0x54,0x57,0xb6,0x21,0x2c,0x61,0x14,0x1b,0xed,0x42,0x68,0xf5,0x6c,0x6a,0x58,0x2a,0x52};
    sm2_fp_from_bytes(a, a68);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a69[32] = {0x59,0x47,0x6d,0x25,0x00,0xf4,0xa4,0x09,0xee,0xc8,0x38,0x1f,0x42,0x67,0xf8,0x94,0xbd,0xcc,0x61,0x26,0x25,0xfe,0x10,0xcd,0x55,0x98,0xb3,0xda,0xdf,0x1a,0xb4,0x60};
    static std::uint8_t c69[32] = {0x53,0x39,0xb3,0xb4,0xaf,0x2c,0x51,0x26,0xf7,0x41,0xa3,0x7c,0xd5,0x75,0x65,0xa6,0x4a,0x8d,0xc2,0x3d,0x36,0x61,0x6d,0x32,0xf8,0x91,0xd0,0x3a,0xc0,0x8a,0xe5,0x30};
    sm2_fp_from_bytes(a, a69);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a70[32] = {0xa1,0xc3,0x22,0x1e,0xe5,0x44,0x3a,0xdc,0x66,0xb6,0xe3,0xde,0x8d,0x0c,0xe5,0xa0,0xb3,0x2d,0x2f,0xd4,0xb6,0x1f,0x94,0x11,0x62,0xf1,0x78,0x58,0x82,0x58,0x21,0x0a};
    static std::uint8_t c70[32] = {0x3c,0x34,0x52,0x64,0xc7,0x87,0x01,0xcb,0x53,0x6f,0x0b,0xf8,0xa9,0x57,0xee,0x97,0x86,0x2e,0x3b,0xd1,0xc7,0x23,0x13,0x74,0xb0,0x3e,0x35,0xc2,0xe4,0x59,0x46,0xe3};
    sm2_fp_from_bytes(a, a70);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a71[32] = {0xbd,0x1c,0x00,0x47,0x9f,0x91,0x5d,0x9a,0xa7,0x54,0x69,0x69,0xbd,0x43,0xdf,0x6a,0xd4,0xd1,0xb9,0x10,0x61,0xb0,0x23,0xc3,0x59,0x1e,0x4d,0x31,0xd5,0x17,0x69,0x82};
    static std::uint8_t c71[32] = {0x78,0x17,0xf3,0x72,0xbf,0x25,0x2e,0x2c,0x94,0x05,0x76,0xb5,0x23,0x56,0x0c,0x29,0x6e,0xb2,0x7b,0x86,0x12,0x68,0x41,0xf3,0xf4,0xc5,0x82,0x8a,0xcf,0x3a,0x38,0x4e};
    sm2_fp_from_bytes(a, a71);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a72[32] = {0x3c,0x46,0xeb,0x2d,0xe3,0xe0,0xae,0x73,0xcf,0xe2,0x67,0x8c,0xf3,0xb5,0x8a,0xd8,0x34,0x54,0x08,0x40,0x07,0x3a,0x9e,0x57,0x8a,0xd8,0xf5,0x15,0x33,0xb0,0xf1,0x38};
    static std::uint8_t c72[32] = {0x7f,0xc2,0x61,0xa0,0x0b,0x74,0x7d,0x37,0x8a,0x3d,0x39,0xe5,0x57,0x93,0xe9,0x44,0x1a,0x3c,0x04,0x3e,0xfb,0x47,0x15,0xe4,0xb9,0x1f,0x05,0x71,0xc9,0xc4,0x83,0xcf};
    sm2_fp_from_bytes(a, a72);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a73[32] = {0x2d,0xf5,0x24,0x77,0x8d,0x0a,0x2b,0x88,0x1a,0xd0,0x95,0x3a,0xbe,0xbc,0x53,0xcb,0x71,0xf6,0x16,0x4a,0x65,0xf0,0x6e,0x3b,0x5f,0x99,0x5f,0x3b,0x23,0xe5,0x43,0x0d};
    static std::uint8_t c73[32] = {0xe0,0xae,0x7e,0x5f,0x7b,0x76,0xc6,0x2d,0xf7,0x1d,0xc0,0x6c,0x10,0xb2,0xba,0x0a,0xff,0x54,0x59,0x21,0xff,0x68,0x8a,0x74,0xd4,0x1f,0x25,0x26,0xed,0x76,0x69,0x36};
    sm2_fp_from_bytes(a, a73);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a74[32] = {0x4b,0x4b,0x87,0x77,0x42,0xb3,0x3d,0xf9,0x8b,0x49,0x63,0x6a,0xcf,0xaa,0x46,0x61,0x0a,0x7c,0x98,0x38,0xc4,0xe0,0xe4,0x69,0xc1,0x4c,0x6a,0xdd,0x98,0x26,0xe6,0xe6};
    static std::uint8_t c74[32] = {0xee,0xfc,0x15,0x63,0x5d,0x54,0x92,0x02,0xc4,0x9a,0x01,0xcb,0x59,0x29,0x9a,0xb3,0x4e,0xfb,0xf8,0x02,0xfd,0x3c,0x33,0x77,0xda,0xc6,0x4c,0x5e,0x9e,0x4b,0x59,0xff};
    sm2_fp_from_bytes(a, a74);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a75[32] = {0x2b,0xa0,0xba,0x29,0x31,0xec,0x9d,0xe4,0xfe,0x99,0x06,0x7e,0x70,0xa8,0x20,0x0b,0xad,0x97,0x87,0x95,0x77,0x06,0xb6,0x88,0x2f,0xdb,0x01,0xdd,0xff,0xe8,0x36,0xa7};
    static std::uint8_t c75[32] = {0x19,0x94,0x8e,0x78,0x20,0x8b,0x12,0xf5,0x1d,0x50,0x51,0x27,0x0f,0xab,0x0b,0x5c,0xdd,0xc5,0x86,0x92,0x3b,0x75,0x7d,0x88,0x21,0xc1,0xa9,0x28,0x2c,0xf5,0x12,0xc3};
    sm2_fp_from_bytes(a, a75);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a76[32] = {0xcd,0x2e,0xdc,0x25,0xa8,0xe3,0xd7,0x34,0xec,0xd1,0xb3,0xba,0xe9,0xe6,0x17,0x5d,0x49,0x56,0xdb,0x61,0xe7,0xcb,0x4f,0xc5,0xb5,0xbb,0xe9,0x2f,0x4b,0x31,0xf4,0x60};
    static std::uint8_t c76[32] = {0xb0,0xdf,0xa3,0xd6,0xe2,0xf6,0x62,0xc0,0x45,0x9e,0xb6,0xa2,0x9b,0xa8,0x3f,0xb2,0xb5,0xb6,0xef,0xa9,0x79,0x4b,0xe0,0x22,0xfa,0xf0,0x90,0x10,0x69,0x4a,0x8c,0x38};
    sm2_fp_from_bytes(a, a76);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a77[32] = {0x4f,0x71,0x51,0x42,0xbe,0x39,0xe0,0xd8,0x0b,0x91,0xea,0xa5,0x4c,0xa8,0x2a,0xea,0x48,0x09,0x73,0xd0,0xb3,0x75,0x47,0xc5,0x38,0xe5,0x08,0x40,0xa7,0xaf,0x3d,0x1f};
    static std::uint8_t c77[32] = {0x93,0xc2,0xf5,0xb8,0xa5,0x3c,0x72,0x9f,0xd2,0xf3,0x8f,0xd8,0x10,0xdd,0xa5,0x9a,0x2f,0xeb,0xbb,0x09,0x06,0x9f,0x23,0x36,0xaa,0xa3,0x0e,0x6a,0x50,0x7a,0x64,0x53};
    sm2_fp_from_bytes(a, a77);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a78[32] = {0x0a,0x5e,0x29,0x98,0xbd,0x7a,0x37,0x81,0xca,0xef,0x1e,0xc8,0xf9,0x07,0xc8,0xa5,0xd9,0xdf,0x19,0x58,0x7f,0x3b,0x1b,0x9c,0xf9,0x47,0x75,0x76,0xee,0x38,0x0e,0xd4};
    static std::uint8_t c78[32] = {0x35,0x03,0xd2,0x26,0xb5,0xb5,0x4d,0xd5,0xa2,0x82,0xb6,0xf5,0x52,0x4b,0x84,0x81,0x3a,0xa3,0xb1,0x66,0xc5,0xf1,0x9d,0x89,0xaf,0xd6,0xb0,0x7c,0xb2,0xe4,0xba,0x4e};
    sm2_fp_from_bytes(a, a78);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a79[32] = {0x67,0xf1,0x9e,0xbe,0xe6,0xa3,0x81,0xed,0x66,0xc6,0x8a,0x90,0xf9,0x64,0x5c,0x62,0xa2,0x18,0xb1,0xa7,0xc5,0x5b,0xaf,0xbc,0x13,0x5c,0x7e,0x32,0xb5,0xc4,0x2c,0x98};
    static std::uint8_t c79[32] = {0xd5,0x0f,0x11,0xb5,0xbd,0x5d,0xaa,0xad,0x57,0xd3,0xd7,0xf9,0xcc,0x90,0xb0,0xbc,0xc6,0xc1,0x8b,0x45,0xe3,0x4b,0x4d,0x3c,0xa2,0xb7,0xee,0xc0,0x8f,0x69,0x8b,0xa1};
    sm2_fp_from_bytes(a, a79);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a80[32] = {0x8d,0xc3,0x39,0x3b,0x0a,0x1d,0x29,0xca,0xed,0xd4,0xcf,0x92,0xe5,0x80,0xe5,0x86,0x6c,0x5f,0x76,0xb9,0x44,0xa6,0x88,0x33,0x22,0xfc,0xff,0x5c,0x9f,0xc0,0x6a,0x52};
    static std::uint8_t c80[32] = {0xe2,0xc6,0x78,0x76,0xa9,0x7e,0xc5,0x7d,0xff,0x07,0x2f,0xba,0xa3,0x6a,0x26,0x13,0xdf,0x7e,0x98,0x90,0x42,0x8e,0x0e,0x9e,0x9c,0x97,0xb6,0x18,0x72,0x2e,0xa0,0x12};
    sm2_fp_from_bytes(a, a80);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a81[32] = {0xae,0xcb,0xd0,0x42,0x7b,0x14,0x49,0xef,0x41,0xba,0x0c,0x9c,0xe6,0xee,0x06,0xe6,0x36,0x15,0x04,0x78,0xff,0xab,0xcb,0x8d,0xbf,0x26,0x08,0x06,0xa3,0x87,0xbe,0xc5};
    static std::uint8_t c81[32] = {0x80,0xe1,0x57,0x27,0x2a,0x3b,0x4c,0x72,0xe4,0x09,0x62,0x88,0x02,0x8a,0xe7,0x86,0x62,0xc1,0x83,0x89,0xea,0x29,0xe9,0xd9,0x9a,0x5e,0x63,0xcc,0x16,0xd4,0x45,0xed};
    sm2_fp_from_bytes(a, a81);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a82[32] = {0x59,0x53,0x32,0x7c,0x3b,0x36,0xfd,0x37,0x3d,0xf5,0x9a,0xeb,0x87,0xac,0x2a,0xff,0x3d,0xa7,0xe3,0x99,0xe5,0x69,0xfb,0x7e,0xc8,0x73,0xd5,0x1c,0xca,0x6c,0xd3,0x7f};
    static std::uint8_t c82[32] = {0x4f,0x0a,0xb2,0x68,0x23,0x00,0xb5,0xfe,0x17,0x0a,0x77,0x78,0xea,0x49,0x4b,0x90,0x6d,0xbc,0x82,0x0a,0xe2,0xf6,0x86,0x08,0x52,0x42,0x3b,0x49,0x19,0x8e,0x60,0xcd};
    sm2_fp_from_bytes(a, a82);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a83[32] = {0x90,0x38,0xe5,0x01,0xa1,0x71,0x48,0x87,0xb8,0xb4,0xba,0x90,0x40,0x3f,0xe4,0xa3,0x32,0x02,0x2e,0xc7,0x3c,0x8d,0xde,0xfd,0x27,0xa2,0x9d,0xc7,0x52,0xb1,0x9f,0x3c};
    static std::uint8_t c83[32] = {0x09,0xc4,0x23,0x57,0xf2,0xf1,0xe3,0xe7,0x51,0x5a,0xd7,0x76,0xac,0xd5,0x94,0x5d,0x80,0xdb,0x1b,0x85,0x96,0xf2,0x10,0xbb,0x92,0x62,0x11,0x32,0x58,0xfb,0x89,0x25};
    sm2_fp_from_bytes(a, a83);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a84[32] = {0x39,0x91,0x7b,0xb2,0x56,0x7f,0x66,0xe3,0xee,0x83,0x59,0x64,0x6c,0x49,0x4a,0x44,0xa1,0x04,0x37,0x7c,0x26,0x8e,0x68,0x6b,0xa2,0x15,0xb1,0x04,0x1c,0x59,0xa5,0x21};
    static std::uint8_t c84[32] = {0xe6,0x53,0xf1,0x2a,0xbb,0xb1,0x67,0x2d,0xd7,0x45,0x65,0x2a,0x92,0x56,0x70,0xec,0xa5,0x00,0xe7,0x7a,0x29,0xbe,0xf1,0xc3,0x25,0x17,0x17,0x51,0x49,0x99,0xf9,0xfd};
    sm2_fp_from_bytes(a, a84);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a85[32] = {0xc9,0xe2,0xaa,0xfb,0xe0,0x3f,0x2a,0x80,0xf1,0x9d,0x6d,0x4b,0x18,0x2a,0xdc,0x6a,0x3b,0x3c,0x67,0xdd,0xf9,0x54,0xdd,0x69,0x06,0xdb,0x32,0xf6,0x85,0x31,0xc8,0x3c};
    static std::uint8_t c85[32] = {0x30,0xc9,0xb1,0x11,0x5c,0x88,0x0e,0x9f,0x9d,0xab,0x13,0x95,0x78,0x16,0x27,0x5e,0xc7,0x80,0xd2,0xac,0x1c,0x76,0x60,0xc8,0xe8,0x79,0xd9,0x26,0x8a,0x13,0x99,0xde};
    sm2_fp_from_bytes(a, a85);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a86[32] = {0x99,0x69,0xc1,0xde,0xfb,0xb8,0xc9,0x54,0x33,0x7f,0x6e,0x4d,0x71,0x01,0xea,0x9a,0x3a,0x7b,0x9c,0x53,0x62,0xb5,0x4d,0x53,0x98,0xfd,0x9a,0x0e,0x57,0x87,0xb5,0xce};
    static std::uint8_t c86[32] = {0xf6,0x79,0x40,0x46,0x59,0x41,0x6e,0xe2,0x01,0xc7,0x55,0xad,0x67,0xb9,0x1d,0x28,0x2a,0xf1,0x2a,0x91,0x54,0x48,0x3b,0x14,0xdc,0x49,0x25,0xd2,0xc4,0x5a,0x7e,0x3d};
    sm2_fp_from_bytes(a, a86);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a87[32] = {0x21,0xa2,0x6a,0xff,0x00,0x64,0xd8,0x07,0xd8,0x33,0xc2,0xb1,0x42,0x21,0xe4,0xe7,0xef,0xbb,0x2e,0x8c,0x60,0x02,0xe9,0xc2,0xc6,0x4a,0xd4,0xc6,0x6c,0xf4,0xe1,0xbf};
    static std::uint8_t c87[32] = {0x2c,0x51,0x54,0x03,0xdd,0xd5,0xdc,0x91,0x68,0xcd,0x67,0x8b,0xd7,0x43,0xe1,0xe0,0xd6,0xb0,0x19,0x19,0x23,0xad,0x0c,0x5f,0x49,0x17,0xe8,0xb8,0xc1,0xb8,0x48,0x01};
    sm2_fp_from_bytes(a, a87);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a88[32] = {0xc6,0x74,0x44,0x4d,0x21,0x64,0xd0,0x31,0x15,0x97,0x0f,0xb8,0x26,0x50,0x5b,0xb4,0x7f,0x61,0x8b,0x03,0x42,0x7e,0xd0,0x2b,0x4c,0x63,0x0f,0x79,0x9a,0xff,0x47,0x46};
    static std::uint8_t c88[32] = {0xf3,0xfe,0x93,0xf1,0x54,0x18,0x9d,0x2f,0x69,0x72,0x37,0xb0,0x27,0xcf,0x41,0xc8,0x18,0xb1,0xaf,0xe4,0x72,0xed,0x53,0x50,0x17,0x23,0xc7,0x39,0x42,0xa4,0x7e,0x96};
    sm2_fp_from_bytes(a, a88);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a89[32] = {0xd7,0x50,0xe4,0xf2,0xda,0x75,0xd5,0x92,0x7d,0x52,0xba,0x37,0x52,0x9c,0x01,0x84,0x02,0x65,0xa4,0x6a,0x97,0x49,0xf6,0xa4,0x56,0xca,0x48,0x57,0x6c,0x67,0x29,0x98};
    static std::uint8_t c89[32] = {0x43,0xd6,0x70,0x72,0x9f,0x32,0x28,0x6a,0xee,0xd5,0xc3,0xda,0x4e,0x38,0x94,0x9d,0x80,0x25,0xf3,0xd1,0x55,0x19,0xf3,0xe6,0x30,0x3a,0x2d,0xdb,0xd2,0x52,0xf7,0x39};
    sm2_fp_from_bytes(a, a89);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a90[32] = {0x04,0xf1,0x6a,0x73,0x3f,0x9d,0x45,0x1e,0x25,0x7e,0x86,0xbe,0x37,0xb3,0x15,0x5c,0xe0,0x4b,0x29,0x10,0xb4,0xf8,0x81,0x31,0x11,0x43,0x81,0x8c,0xd8,0x61,0x57,0xa2};
    static std::uint8_t c90[32] = {0xeb,0x41,0x80,0x7f,0x37,0x0f,0x5c,0xe0,0x6b,0x5f,0xd7,0xb2,0x72,0x37,0x18,0xa4,0x00,0x8c,0x85,0xa8,0x4f,0x73,0x8e,0xc7,0x69,0x77,0xdd,0x4d,0xf0,0x8e,0xa7,0x15};
    sm2_fp_from_bytes(a, a90);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a91[32] = {0xe8,0x21,0xc3,0xc9,0x68,0xae,0x7a,0xe9,0x4e,0x63,0xc4,0xc7,0xa1,0x13,0xe1,0x8e,0x68,0xa7,0x33,0x4a,0x16,0xaf,0x05,0x07,0x5a,0x9e,0xc0,0x02,0xbc,0xff,0x44,0xc4};
    static std::uint8_t c91[32] = {0x4b,0x15,0x41,0x8d,0x53,0x08,0x45,0x61,0xd0,0xf8,0xf4,0xa2,0x09,0x21,0xc0,0x47,0xfd,0x78,0x7c,0xf7,0x8e,0x00,0x22,0x28,0xc4,0xe4,0x53,0x22,0x67,0xce,0x21,0xd1};
    sm2_fp_from_bytes(a, a91);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a92[32] = {0x75,0x20,0x6f,0x22,0xee,0xd2,0xf7,0x3b,0x80,0x62,0x77,0x14,0x2f,0xfd,0x3d,0x79,0x0f,0x4a,0x0f,0xf6,0xde,0xca,0x7b,0x16,0x3d,0x24,0xa7,0x40,0x8e,0x8b,0xac,0xd3};
    static std::uint8_t c92[32] = {0xc0,0x9e,0xef,0xb5,0xb4,0x04,0x0c,0xbc,0xa7,0x08,0xb0,0x46,0x3b,0x03,0x8a,0xea,0xfc,0x13,0x51,0x1e,0x06,0xd7,0x1d,0x27,0x03,0xfb,0xa4,0x8d,0x67,0xc4,0x8f,0x3a};
    sm2_fp_from_bytes(a, a92);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a93[32] = {0xfa,0xa2,0xc1,0x63,0x21,0xd1,0xb3,0xd0,0x19,0x0c,0xe8,0x1f,0x62,0x20,0x0a,0xe7,0x8f,0x39,0xca,0x06,0xf8,0x0e,0xe0,0x3e,0x93,0x30,0x72,0x2b,0x87,0xf7,0xac,0xdc};
    static std::uint8_t c93[32] = {0x53,0x83,0x2c,0x03,0xda,0x49,0xa7,0x4b,0xe6,0x71,0x24,0xff,0xee,0xb2,0xda,0x28,0xcc,0xa7,0xce,0xb4,0xfa,0x58,0x95,0x45,0xf6,0x7c,0xed,0xa6,0x84,0x44,0x54,0xaa};
    sm2_fp_from_bytes(a, a93);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a94[32] = {0x7e,0x75,0x06,0xf4,0x9a,0x88,0x03,0x42,0xa1,0xf2,0x96,0x9f,0xe9,0x90,0x7e,0xa9,0x51,0x8b,0x71,0x3c,0xc8,0x8e,0x06,0x45,0xff,0x7b,0xe4,0xc3,0x97,0x22,0x2a,0x94};
    static std::uint8_t c94[32] = {0xbd,0x4a,0xb9,0x69,0xb6,0x31,0xdf,0xcb,0xde,0xa6,0xf2,0x30,0x9a,0x20,0x83,0x19,0x2a,0xc6,0x2e,0xbd,0xd1,0x75,0x6f,0x68,0x2d,0x22,0x2d,0x60,0xda,0xf3,0x62,0x1d};
    sm2_fp_from_bytes(a, a94);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a95[32] = {0x7f,0x76,0xca,0x71,0xf4,0xf7,0xe1,0xa5,0x85,0x21,0x9a,0x64,0x0b,0x42,0xe0,0xaf,0x5a,0x84,0x3b,0x9c,0xf0,0x6f,0x77,0xd5,0x3f,0xdd,0xe0,0x98,0x84,0xfc,0xee,0xb5};
    static std::uint8_t c95[32] = {0xd8,0xbe,0x01,0x8a,0x7c,0x93,0x91,0x7c,0xc8,0x2f,0xb0,0x18,0x10,0xe2,0xb4,0x6b,0x7c,0x73,0x03,0xf8,0x19,0x69,0xd7,0xf0,0x0d,0x02,0xfb,0x81,0x0d,0x0f,0x23,0x44};
    sm2_fp_from_bytes(a, a95);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a96[32] = {0x40,0x57,0xcb,0x78,0xe4,0xfb,0x15,0xd9,0x8c,0x53,0xc4,0xe6,0x2a,0x7f,0x3d,0x92,0x9e,0x6e,0xfa,0xb8,0x67,0x98,0x7b,0x58,0x19,0x43,0x71,0x6e,0x32,0xab,0x3c,0x79};
    static std::uint8_t c96[32] = {0x90,0x99,0xcc,0x7e,0x37,0xed,0x0d,0x15,0xcf,0x2d,0xa6,0xd4,0x82,0x8d,0x98,0xe7,0x61,0xb2,0x2e,0xb2,0xe2,0x9f,0x98,0xfa,0x3f,0x8d,0xb5,0xd8,0x9c,0x5a,0xfd,0x01};
    sm2_fp_from_bytes(a, a96);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a97[32] = {0x16,0x93,0xe1,0xf2,0x10,0xb3,0xa4,0x49,0xdd,0x95,0x77,0x10,0x05,0x2d,0x3a,0xe7,0x7a,0x9a,0xd7,0x66,0x10,0xfb,0x31,0x1f,0xb0,0x32,0x89,0xf2,0x62,0x33,0xfb,0x5b};
    static std::uint8_t c97[32] = {0x8e,0xec,0x9e,0x2e,0x4f,0x9a,0x29,0x4b,0x04,0x15,0xb8,0x64,0xe5,0x5b,0x6d,0x95,0x8a,0x3b,0x5f,0x21,0x92,0xe3,0xf0,0x5f,0xe2,0x30,0xa7,0xef,0x77,0x6c,0x49,0x23};
    sm2_fp_from_bytes(a, a97);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a98[32] = {0xc3,0xe9,0xef,0xf9,0x60,0xdb,0xa7,0x09,0xc9,0xe1,0x87,0xda,0xfd,0x05,0x1f,0x4d,0x14,0x96,0xeb,0xed,0x18,0xf4,0x38,0x22,0x4d,0xeb,0x20,0x7e,0xa3,0x3a,0x08,0xd4};
    static std::uint8_t c98[32] = {0xe8,0x50,0x60,0x5f,0x87,0x0f,0xa6,0xf0,0x7d,0xd5,0x65,0xd3,0xd8,0xec,0x70,0x93,0x56,0x44,0x2b,0x6c,0x88,0xe3,0xfa,0x5a,0x7d,0xb3,0x11,0x8a,0x43,0xef,0x86,0xf6};
    sm2_fp_from_bytes(a, a98);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
    static std::uint8_t a99[32] = {0x56,0x90,0xb3,0x0e,0x70,0x21,0xb8,0xdb,0xe1,0xa3,0xda,0xe8,0xce,0xc7,0x4a,0xd9,0xda,0x6b,0x52,0x1f,0x68,0x1d,0xa2,0xd3,0xc2,0xe9,0xcb,0x79,0x07,0x1e,0xf7,0x71};
    static std::uint8_t c99[32] = {0x7f,0x20,0xba,0x46,0x22,0x2a,0xab,0x13,0xe5,0x27,0x53,0x16,0xf9,0x2a,0x3a,0x26,0x6b,0xae,0x5f,0xbd,0x75,0x9c,0xa4,0xcd,0xd0,0x74,0xef,0xb2,0x2d,0xea,0x10,0x3d};
    sm2_fp_from_bytes(a, a99);
    sm2_fp_sqrt(c, a);
    sm2_fp_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm2_fp_sqrt");
    }
}